package com.itcast.dao;

import com.itcast.pojo.Emp;
import com.itcast.utils.JDBCUtils;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
public class EmpDao {
    public List<Emp> findAll() throws Exception {
        List<Emp> emps = JDBCUtils.executeQuery("select * from emp", Emp.class);
        return emps;
    }
}
